YES 0.792
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/Monad.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule Monad
| ((foldM_ :: (a -> b -> IO a) -> a -> [b] -> IO ()) :: (a -> b -> IO a) -> a -> [b] -> IO ()) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| foldM :: Monad c => (a -> b -> c a) -> a -> [b] -> c a
foldM | _ a [] | = | return a |
foldM | f a (x : xs) | = | f a x >>= (\fax ->foldM f fax xs) |
|
| foldM_ :: Monad c => (b -> a -> c b) -> b -> [a] -> c ()
foldM_ | f a xs | = | foldM f a xs >> return () |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Lambda Reductions:
The following Lambda expression
\fax→foldM f fax xs
is transformed to
foldM0 | f xs fax | = foldM f fax xs |
The following Lambda expression
\_→q
is transformed to
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
mainModule Monad
| ((foldM_ :: (a -> b -> IO a) -> a -> [b] -> IO ()) :: (a -> b -> IO a) -> a -> [b] -> IO ()) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| foldM :: Monad c => (b -> a -> c b) -> b -> [a] -> c b
foldM | _ a [] | = | return a |
foldM | f a (x : xs) | = | f a x >>= foldM0 f xs |
|
|
foldM0 | f xs fax | = | foldM f fax xs |
|
| foldM_ :: Monad a => (c -> b -> a c) -> c -> [b] -> a ()
foldM_ | f a xs | = | foldM f a xs >> return () |
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule Monad
| ((foldM_ :: (a -> b -> IO a) -> a -> [b] -> IO ()) :: (a -> b -> IO a) -> a -> [b] -> IO ()) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| foldM :: Monad c => (b -> a -> c b) -> b -> [a] -> c b
foldM | vw a [] | = | return a |
foldM | f a (x : xs) | = | f a x >>= foldM0 f xs |
|
|
foldM0 | f xs fax | = | foldM f fax xs |
|
| foldM_ :: Monad b => (a -> c -> b a) -> a -> [c] -> b ()
foldM_ | f a xs | = | foldM f a xs >> return () |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
mainModule Monad
| (foldM_ :: (b -> a -> IO b) -> b -> [a] -> IO ()) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| foldM :: Monad c => (b -> a -> c b) -> b -> [a] -> c b
foldM | vw a [] | = | return a |
foldM | f a (x : xs) | = | f a x >>= foldM0 f xs |
|
|
foldM0 | f xs fax | = | foldM f fax xs |
|
| foldM_ :: Monad c => (a -> b -> c a) -> a -> [b] -> c ()
foldM_ | f a xs | = | foldM f a xs >> return () |
|
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
new_foldM0(wu3, wu51, wu7, h, ba) → new_foldM(wu3, wu51, h, ba)
new_foldM(wu3, :(wu50, wu51), h, ba) → new_foldM(wu3, wu51, h, ba)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_foldM(wu3, :(wu50, wu51), h, ba) → new_foldM(wu3, wu51, h, ba)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldM(wu3, :(wu50, wu51), h, ba) → new_foldM(wu3, wu51, h, ba)
The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3, 4 >= 4